package Ventanas;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;
import javax.swing.border.*;
import javax.swing.table.*;
import com.toedter.calendar.*;




/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
/**
 * @author lucas
 */
public class VentanaSeleccionarTurno extends JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}


	private void initComponents() {

		panelIzq = new JPanel();
		calendario = new JCalendar();
		panelDer = new JPanel();
		scrollerTable = new JScrollPane();
		tblTurnos = new JTable();
		panelAbajo = new JPanel();
		btnCancelar = new JButton();
		separator1 = new JSeparator();

		//======== this ========
		{
			this.setTitle("Seleccionar Turno");
			this.setResizable(false);
			this.setVisible(true);
			this.setName("this");
			this.setIconImage(new ImageIcon("C:\\Documents and Settings\\LUCAS\\Escritorio\\SEMINARIO I\\images\\a\u00f1adirCalendario.png").getImage());
			this.setAlwaysOnTop(true);
			Container thisContentPane = this.getContentPane();
			thisContentPane.setLayout(null);
	
			//======== panelIzq ========
			{
				panelIzq.setBorder(new EmptyBorder(0, 0, 0, 3));
				panelIzq.setLayout(null);
	
				//---- calendario ----
				calendario.getLocale();
				calendario.setTodayButtonVisible(true);
				calendario.setDecorationBackgroundColor(UIManager.getColor("Button.background"));
				panelIzq.add(calendario);
				calendario.setBounds(0, 35, 210, 175);
	
				{ // compute preferred size
					Dimension preferredSize = new Dimension();
					for(int i = 0; i < panelIzq.getComponentCount(); i++) {
						Rectangle bounds = panelIzq.getComponent(i).getBounds();
						preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
						preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
					}
					Insets insets = panelIzq.getInsets();
					preferredSize.width += insets.right;
					preferredSize.height += insets.bottom;
					panelIzq.setMinimumSize(preferredSize);
				}
			}
			thisContentPane.add(panelIzq);
			panelIzq.setBounds(0, 39, 213, 222);
	
			//======== panelDer ========
			{
				panelDer.setBorder(null);
				panelDer.setLayout(null);
	
				//======== scrollerTable ========
				{
					scrollerTable.setBorder(new TitledBorder("Listado de turnos"));
	
					//---- tblTurnos ----
					tblTurnos.setModel(new DefaultTableModel(
						new Object[][] {
							{"10:00", null},
							{"10:15", null},
							{"10:30", null},
							{"10:45", null},
							{"11:00", null},
							{"11:15", null},
							{"11:30", null},
							{"11:45", null},
							{"12:00", null},
							{"12:15", null},
							{"12:30", null},
							{"12:45", null},
						},
						new String[] {
							"Hora", "Estado"
						}
					) {
						boolean[] columnEditable = new boolean[] {
							false, false
						};
						@Override
						public boolean isCellEditable(int rowIndex, int columnIndex) {
							return columnEditable[columnIndex];
						}
					});
					{
						TableColumnModel cm = tblTurnos.getColumnModel();
						cm.getColumn(0).setResizable(false);
						cm.getColumn(0).setPreferredWidth(40);
						cm.getColumn(1).setResizable(false);
						cm.getColumn(1).setPreferredWidth(150);
					}
					scrollerTable.setViewportView(tblTurnos);
				}
				panelDer.add(scrollerTable);
				scrollerTable.setBounds(15, 2, 225, 235);
	
				{ // compute preferred size
					Dimension preferredSize = new Dimension();
					for(int i = 0; i < panelDer.getComponentCount(); i++) {
						Rectangle bounds = panelDer.getComponent(i).getBounds();
						preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
						preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
					}
					Insets insets = panelDer.getInsets();
					preferredSize.width += insets.right;
					preferredSize.height += insets.bottom;
					panelDer.setMinimumSize(preferredSize);
					panelDer.setPreferredSize(preferredSize);
				}
			}
			thisContentPane.add(panelDer);
			panelDer.setBounds(218, 0, 247, 237);
	
			//======== panelAbajo ========
			{
				panelAbajo.setBorder(null);
				panelAbajo.setLayout(null);
	
				//---- btnAsignarTurno ----
			
	
				//---- btnCancelar ----
				btnCancelar.setText("Cancelar");
				btnCancelar.setIcon(new ImageIcon("C:\\Documents and Settings\\LUCAS\\Escritorio\\images\\cruzCancelar.jpg"));
				panelAbajo.add(btnCancelar);
				btnCancelar.setBounds(261, 10, 134, btnCancelar.getPreferredSize().height);
				{
					separator2 = new JSeparator();
					panelAbajo.add(separator2);
					separator2.setBackground(Color.black);
					separator2.setForeground(Color.black);
					separator2.setBounds(33, 6, 623, 5);
				}
				
				{ // compute preferred size
					Dimension preferredSize = new Dimension();
					for(int i = 0; i < panelAbajo.getComponentCount(); i++) {
						Rectangle bounds = panelAbajo.getComponent(i).getBounds();
						preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
						preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
					}
					Insets insets = panelAbajo.getInsets();
					preferredSize.width += insets.right;
					preferredSize.height += insets.bottom;
					panelAbajo.setMinimumSize(preferredSize);
				}
			}
			thisContentPane.add(panelAbajo);
			panelAbajo.setBounds(0, 262, 456, 17);
	
			//---- separator1 ----
			separator1.setBackground(Color.black);
			separator1.setOrientation(SwingConstants.VERTICAL);
			separator1.setForeground(Color.black);
			thisContentPane.add(separator1);
			separator1.setBounds(215, 29, 5, 250);
			{
				lblMedico = new JLabel();
				thisContentPane.add(lblMedico);
				lblMedico.setText("Medico:");
				lblMedico.setBounds(12, 12, 43, 16);
			}
			{
				JTextField txtMedico = new JTextField();
				thisContentPane.add(txtMedico);
				txtMedico.setBounds(62, 11, 116, 22);
			}
			{
				JButton btnAsigarTurno = new JButton();
				thisContentPane.add(btnAsigarTurno);
				btnAsigarTurno.setText("Asignar Turno");
				btnAsigarTurno.setBounds(362, 298, 119, 22);
				btnAsigarTurno.addActionListener(new ActionListener(){
							
							public void actionPerformed (ActionEvent paramActionEvent){
								VentanaConfirmarTurno vent= new VentanaConfirmarTurno();
								vent.setVisible(true);
							}
						});
			}
			{
				jButton1 = new JButton();
				thisContentPane.add(jButton1);
				jButton1.setText("Cancelar");
				jButton1.setBounds(178, 298, 76, 22);
				jButton1.addActionListener(new ActionListener(){
							
							public void actionPerformed (ActionEvent paramActionEvent){
								dispose();
							}
						});
			}

			//---- separator2 ----

			{ // compute preferred size
				Dimension preferredSize = new Dimension();
				for(int i = 0; i < thisContentPane.getComponentCount(); i++) {
					
					Rectangle bounds = thisContentPane.getComponent(i).getBounds();
					preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
					preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
				}
				Insets insets = thisContentPane.getInsets();
				preferredSize.width += insets.right;
				preferredSize.height += insets.bottom;
				thisContentPane.setMinimumSize(preferredSize);
				thisContentPane.setPreferredSize(new java.awt.Dimension(518, 335));
			}
			this.pack();
			this.setSize(539, 367);
			this.setLocationRelativeTo(null);
		}
	}

	private JButton btnAsigarTurno;
	private JTextField txtMedico;
	private JPanel panelIzq;
	private JCalendar calendario;
	private JLabel lblMedico;
	private JButton jButton1;
	private JPanel panelDer;
	private JScrollPane scrollerTable;
	private JTable tblTurnos;
	private JPanel panelAbajo;
	private JButton btnCancelar;
	private JSeparator separator1;
	private JSeparator separator2;
}
